package net.sf.jOpinionPoll.tag.component;

import javax.faces.component.UIComponent;
import javax.faces.webapp.UIComponentELTag;

/**
 * @author EricoGR
 *
 */
public class SimpleTitleTag extends UIComponentELTag {
	private String m_Text;
	private String m_StyleClass;
	private String m_Style;
    private String m_LineStyle;
    private String m_LineStyleClass;
	
	private static final String COMPONENT_TYPE = "net.sf.jOpinionPoll.tag.component.SimpleTitleTagComponent";
	private static final String RENDER_TYPE = "net.sf.jOpinionPoll.tag.component.SimpleTitleTagRenderer";
	
	public void setText(String text) {
		this.m_Text = text;
	}

	public String getText() {
		return m_Text;
	}
	
	public String getStyleClass() {
		return m_StyleClass;
	}

	public void setStyleClass(String styleClass) {
		this.m_StyleClass = styleClass;
	}

	public String getStyle() {
		return m_Style;
	}

	public void setStyle(String style) {
		this.m_Style = style;
	}

    public String getLineStyle() {
        return m_LineStyle;
    }
    
    public void setLineStyle(String lineStyle) {
        m_LineStyle = lineStyle;
    }
    
    public String getLineStyleClass() {
        return m_LineStyleClass;
    }
    
    public void setLineStyleClass(String lineStyleClass) {
        m_LineStyleClass = lineStyleClass;
    }
	
	@Override
	protected void setProperties(UIComponent component) {
		super.setProperties(component);
		((UISimpleTitleComponent)component).setText(getText());
		((UISimpleTitleComponent)component).setStyle(getStyle());
		((UISimpleTitleComponent)component).setStyleClass(getStyleClass());
        ((UISimpleTitleComponent)component).setLineStyleClass(getLineStyleClass());
        ((UISimpleTitleComponent)component).setLineStyle(getLineStyle());
	}


	@Override
	public String getComponentType() {
		return COMPONENT_TYPE;
	}

	@Override
	public String getRendererType() {
		return RENDER_TYPE;
	}
}